package com.hisense.hiioc.hismartplate.robot.context;


import com.hisense.hiioc.hismartplate.robot.aiml.AskToAIML;

public class ChartManager {
    private static final AskToAIML askToAIML = new AskToAIML();
    private static ChartContext chartContext = null;
    private static ChartManager instance = null;

    /**
     * 单例模式
     */
    private ChartManager() {

//        if (Boolean.valueOf((String) RobotProperty.getConfiguration().get("DBAvailable"))) {
//            askToDB = new AskToDB();
//        }
        chartContext = new ChartContext(askToAIML);
    }

    public static ChartManager getInstance() {
        if (instance == null) {
                instance = new ChartManager();
        }
        return instance;
    }

    public String response(String input) {
        return chartContext.response(input);
    }

}
